const db = require('../models');
const Luck = db.Luck;

const findLucks = async ( req, res ) => {
    const lucksResult = await Luck.findAll({
        where: {
            barName: req.query.barName
        }
    });
    return lucksResult;
}

const findLuckClassify = async ( req, res ) => {
    const classifyResult = await Luck.findAll({
        where: {
            barName: req.query.barName,
            classify: req.query.classify
        }
    });
    return classifyResult;
}


module.exports = {findLucks, findLuckClassify};